<?

class ApplicationController extends Controller
{

	function processIndex($req)
	{
		$view = $this->getView("index");
		return $view;
	}
	
	
	function encode($obj)
	{
		$j = new Services_JSON();
		return $j->encode($obj);		
	}
	
	function getPage($name)
	{
		$method = "_page".$this->_formatName($name);
		if (method_exists($this, $method))
			return $this->$method(Core::req());
		else {
			$view = $this->getView($name);
			return $view;
		}
	}
}

?>